<?php
namespace Admin\Controller;
use Think\Controller;
class GoodsHasGoodattributeController extends CommonController
{

	/**
	 * @var      String
	 */
	public $attributeValue;


	public function checkattrajax(){
		if(IS_POST){
			$attrwhere['GoodcategoryId']=I('post.categoryid');		//通过分类名称来初步筛选goodatrribute表中存在的属性，尽管goods_has_goodattribute表中没有这些属性
			//这种筛选没有筛选掉商品类别一样的商品，还需要在Goods的update界面中将本商品属性和新增的goodattribute属性以外的属性给删除掉
			$goodattribute=M('goods_has_goodattribute')->join('right join goodattribute ON goods_has_goodattribute.goodattribute_GoodAttributeid=goodattribute.GoodAttributeid')->where($attrwhere)->select();
			$this->ajaxReturn($goodattribute);	//返回到ajax中是msg
		}
	}
}

?>